<?php
/**
 * 配置
 * 
 * @version $Id: main.php 486 2012-11-05 07:19:04Z linsir123 $
 */
return array(
	'urlMode' => URL_REWRITE,
	'controllerDefault' => 'site',
	'controllerMiss' => array('site', 'miss'),
	'appSubs' => array('admin'=>array(), 'user'=>array()),
	'appDefault' => array('alias'=>'site'),
	'view' => array('engine'=>'Smarty','caching'=>1, 'cache_lifetime'=>3600*24*1),
	'urlRoutes' => array(
		// 分类(普通)
		array(
			'pattern' => '/^(list)\/(.+)\/(\d+)-([^\-]+)-([^\-]+)-([^\-]+)-(\d+)-(\d+)$/i',
			'keys' => array('type', 'pinyin', 'cid', 'keyword', 'start_price', 'end_price', 'sort', 'p'),
			'route' => 'items/list'
		),
		// 分类(折扣)
		array(
			'pattern' => '/^(zhe)\/(.+)\/(\d+)-([^\-]+)-(\d+)-(\d+)$/i',
			'keys' => array('type', 'pinyin', 'cid', 'keyword', 'sort', 'p'),
			'route' => 'items/zhe'
		),
		// 商铺
		array(
			'pattern' => '/^shop\/([^\-\/jump]+)$/i',
			'keys' => array('nick'),
			'route' => 'shop/info'
		),
		// 商城
		array(
			'pattern' => '/^tmall\/(brand)\/(.+)\/(\d+)-(\d+)$/i',
			'keys' => array('type', 'pinyin', 'cid', 'p'),
			'route' => 'tmall/list'
		),
		// 商品
		array(
			'pattern' => '/^item\/(\d+)$/i',
			'keys' => array('iid'),
			'route' => 'item/info'
		),
		// 页面跳转
		array(
			'pattern' => '/^goto\/(\S+)\/(.*)$/i',
			'keys' => array('action', 'data'),
			'route' => 'site/redirect'
		)
	),
	'dsn' => array(
		array('127.0.0.1', 'root', '123456', 'e35go'),
	),
	'dbTable' => array(
		array('prefix' => 'e35go_'),
	),
);
